import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Rbook book = new Rbook();
        Scanner input = new Scanner(System.in);
        book.getDocument();
        System.out.println("----欢迎来到XX书店----");
        double price = 0;
        String index;
        do{
            book.getInfo();
            book.show();
            System.out.println("请输入书本id：");
            int id = input.nextInt();
            price += book.Rent(id);
            System.out.println("继续购买吗？y/n");
            index = input.next();
        }while (index.equals("y"));
        System.out.println("----谢谢惠顾----");
        System.out.println("一共"+price+"元");
    }
}
